import request from '@/utils/request'

//查询全部
export function loadDictDataByType(data) {
    return request({
        url: '/system/dic/data/loadDictDataByType/' + data,
        method: 'get',
    })
}

//分页查询
export function loadDictDataByPage(data) {
    return request({
        url: '/system/dic/data/loadDictDataByPage',
        method: 'get',
        params: data
    })
}

//插入字典
export function insertDicData(data) {
    return request({
        url: '/system/dic/data/insertDicData',
        method: 'post',
        params: data
    })
}

//修改字典
export function modifyDicData(data) {
    return request({
        url: '/system/dic/data/modifyDicData',
        method: 'put',
        params: data
    })
}

//删除字典
export function removeDicData(data) {
    return request({
        url: '/system/dic/data/removeDicData/' + data,
        method: 'delete',
    })
}

//初始化字典
export function loadDictDataById(data) {
    return request({
        url: '/system/dic/data/getDictData/' + data,
        method: 'get'
    })
}